package com.py.credit.controller;


import com.alibaba.fastjson.JSONArray;
import com.py.credit.common.logs.ExceptionLogger;
import com.py.credit.common.rest.RestServiceResult;
import com.py.credit.dao.UploadPublicDao;
import com.py.credit.dao.UploadXycnDao;
import com.py.credit.entity.*;
import com.py.credit.service.RemoteBaseService;
import com.py.credit.service.UploadService;
import com.py.credit.utils.DateUtil;
import com.py.credit.utils.DateUtils;
import com.py.credit.utils.SubmitConvXmlUtils;
import com.py.framework.core.annotation.IgnoreAuthority;
import com.py.framework.core.common.Page;
import com.py.framework.core.helper.HttpServletHelper;
import okhttp3.FormBody;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.configuration.jsse.TLSClientParameters;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.cxf.transport.http.HTTPConduit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;

import javax.net.ssl.*;
import javax.servlet.http.HttpServletRequest;
import java.io.*;
import java.security.cert.CertificateException;
import java.text.Normalizer;
import java.util.*;
import java.util.stream.Collectors;

@RestController
@RequestMapping(value = "/uploadTaiQian")
public class UploadTaiQianController {
    protected int socketTimeout = 30000;// 请求超时时间
    protected int connectTimeout = 30000;// 传输超时时间
    //protected String XKPostUrl = "http://59.207.122.239:8080/jiekou/gonggongxinxipingtai_jiekou.php";
    protected String postUrl = "http://59.207.122.239:8080/jiekou/gonggongxinxipingtai_jiekou.php";
    protected String sgs_apiKey = "e9287247d4487f2e2187c976aaf628d1";
    private final Logger log = LoggerFactory.getLogger(UploadTaiQianController.class);
    protected String namespace = "com.test.webservices";//命名空间
    protected String xzxkMethodName = "importPermissionXml";//行政许可
    protected String xzxkMethodId = "10";//行政许可
    protected String xzcfMethodName = "importPenalyXml";//行政处罚
    protected String xzcfMethodId = "11";//行政处罚
    protected String jdjcMethodName = "importJdjcXml";//监督检查
    protected String jdjcMethodId = "12";//监督检查
    protected String xzqzMethodName = "importXzqzXml";//行政强制
    protected String xzqzMethodId = "13";//行政强制
    protected String xzzsMethodName = "importXzzsXml";//行政征收
    protected String xzzsMethodId = "14";//行政征收
    protected String xzjfMethodName = "importXzjfXml";//行政给付
    protected String xzjfMethodId = "15";//行政给付
    protected String xzjlMethodName = "importXzjlXml";//行政奖励
    protected String xzjlMethodId = "16";//行政奖励
    protected String xzcjMethodName = "importXzcjXml";//行政裁决
    protected String xzcjMethodId = "17";//行政裁决
    protected String xzqrMethodName = "importXzqrXml";//行政确认
    protected String xzqrMethodId = "18";//行政确认
    protected String qtxzglMethodName = "importQtxzzfxxXml";//其他行政管理
    protected String qtxzglMethodId = "19";//其他行政管理
    protected String xycnMethodName = "importXycnXml";//信用承诺信息
    protected String xycnMethodId = "21";//信用承诺信息
    protected String ccrwMethodName = "importCcRwXml";//抽查任务
    protected String ccrwMethodId = "23";//抽查任务
    protected String ccjgMethodName = "importCcJgXml";//抽查结果
    protected String ccjgMethodId = "24";//抽查结果

//    protected String CFPostUrl="https://59.227.152.250:8443/creditdatas/ws/xzcfNewService?wsdl";
    //protected String CFPostUrl="http://59.207.122.239:8080/jiekou/gonggongxinxipingtai_jiekou.php";

    protected String cns_apiKey = "cc5ddb44b7a92c23cfeab12981a312fd";
//    protected String FRXYCNPostUrl="http://59.207.122.239:8080/jiekou/gonggongxinxipingtai_jiekou.php";
//    protected String FRXYCNMethodName = "importCxycnXml";//没此接口方法
//    protected String ZRRXYCNPostUrl="http://59.207.122.239:8080/jiekou/gonggongxinxipingtai_jiekou.php";
//    protected String ZRRXYCNMethodName = "importPxycnXml";//无此接口
//    protected String LYJNPostUrl="http://59.207.122.239:8080/jiekou/gonggongxinxipingtai_jiekou.php";
//    protected String LYJNMethodName = "importXycnLyjnXml";//无此接口
    protected String UserCode = "1620";//市平台用户

    @Autowired
    private UploadService upLoadService;

    @Autowired
    private UploadPublicDao uploadPublicDao;

    @Autowired
    private UploadXycnDao uploadXycnDao;

    @Autowired
    private RemoteBaseService remoteBaseService;

    /**
     * 上传行政许可
     * 0 法人 1 自然人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadXzxk.json")
    public RestServiceResult<Object>  uploadXzxk(int type) throws UnsupportedEncodingException {
        RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
            Object data = execute(type,namespace, postUrl,  xzxkMethodName,xzxkMethodId, 0, null ,sgs_apiKey);
            result.setData(data);
            return result;
        } catch (UnsupportedEncodingException e) {
            ExceptionLogger.error("UploadController#uploadXzxk", "数据推送异常！ERROR：" + e.getMessage(), e);
            result.setCode(RestServiceResult.CODE_UNKNOW);
            result.setMsg("行政许可推送定时任务异常！");
            return result;
        }
    }

    /**
     * 上传行政处罚
     * @param type 2 法人 3 自然人
     * @throws UnsupportedEncodingException
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadXzcf.json")
    public  RestServiceResult<Object> uploadXzcf(int type) throws UnsupportedEncodingException {
        RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
            Object	data = execute(type,namespace, postUrl, xzcfMethodName,xzcfMethodId, 0, null ,sgs_apiKey);
            result.setData(data);
            return result;
        } catch (UnsupportedEncodingException e) {
            ExceptionLogger.error("UploadController#uploadXzcf", "数据推送异常！ERROR：" + e.getMessage(), e);
            result.setCode(RestServiceResult.CODE_UNKNOW);
            result.setMsg("行政处罚推送定时任务异常！");
            return result;
        }
    }

    /**
     * 监督检查
     * @param type 4 法人 5 自然人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadJdjc.json")
    public RestServiceResult<Object>  uploadJdjc(int type) throws UnsupportedEncodingException {
        RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
            Object data = execute(type,namespace, postUrl, jdjcMethodName,jdjcMethodId, 0, null ,sgs_apiKey);
            result.setData(data);
            return result;
        } catch (Exception e) {
            com.py.framework.core.log.ExceptionLogger.error("UploadPublicController#uploadJdjc", "监督检查信息回传异常！ERROR：" + e.getMessage(), e);
            result.setCode(RestServiceResult.CODE_UNKNOW);
            result.setMsg("监督检查回传定时任务异常！");
            return result;
        }
    }

    @RequestMapping(value = "/selectSubmitLogsInfos.json")
    public RestServiceResult<Object>  selectSubmitLogsInfos(String type, String startTime, String endTime,String title_id,String zxdw_name,String status,Page page, HttpServletRequest request) throws UnsupportedEncodingException {
        RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
            String token = HttpServletHelper.getUserToken(request);
            RestServiceResult<SysUser> user = remoteBaseService.getCurrentUser(token);
            String rolename=user.getData().getRoleName();
            String deptId;

            if(rolename.equals("系统管理员")) {
                deptId = "";
            }else {
                deptId = String.valueOf(user.getData().getOfficeId());
            }
            Map<String,Object> param = new HashMap<>();
            param.put("type",type);
            param.put("reqDate1",startTime);
            param.put("reqDate2",endTime);
            param.put("title_id",title_id);
            param.put("zxdw_name",zxdw_name);
            param.put("status",status);
            List<Map<String,Object>> res = uploadPublicDao.selectSubmitLogsInfosForPage(param,page);
            result.setCount(page.getTotalCount());
            result.setData(res);
            return result;
        } catch (Exception e) {
            com.py.framework.core.log.ExceptionLogger.error("UploadPublicController#uploadJdjc", "监督检查信息回传异常！ERROR：" + e.getMessage(), e);
            result.setCode(RestServiceResult.CODE_UNKNOW);
            result.setMsg("查询推送市平台日志异常！");
            return result;
        }
    }

    /**
     * 行政强制
     * @param type 6 法人 7 自然人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadXzqz.json")
    public RestServiceResult<Object>  uploadXzqz(int type) throws UnsupportedEncodingException {
        RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
            Object data = execute(type,namespace, postUrl, xzqzMethodName,xzqzMethodId, 0, null ,sgs_apiKey);
            result.setData(data);
            return result;
        } catch (Exception e) {
            com.py.framework.core.log.ExceptionLogger.error("UploadPublicController#uploadXzqz", "行政强制信息回传异常！ERROR：" + e.getMessage(), e);
            result.setCode(RestServiceResult.CODE_UNKNOW);
            result.setMsg("行政强制回传定时任务异常！");
            return result;
        }
    }

    /**
     * 行政征收
     * @param type 8 法人 9 自然人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadXzzs.json")
    public RestServiceResult<Object>  uploadXzzs(int type) throws UnsupportedEncodingException {
        RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
            Object data = execute(type,namespace, postUrl, xzzsMethodName, xzzsMethodId, 0, null ,sgs_apiKey);
            result.setData(data);
            return result;
        } catch (Exception e) {
            com.py.framework.core.log.ExceptionLogger.error("UploadPublicController#uploadXzzs", "行政征收信息回传异常！ERROR：" + e.getMessage(), e);
            result.setCode(RestServiceResult.CODE_UNKNOW);
            result.setMsg("行政征收回传定时任务异常！");
            return result;
        }
    }

    /**
     * 行政给付
     * @param type 10 法人 11 自然人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadXzjf.json")
    public RestServiceResult<Object>  uploadXzjf(int type) throws UnsupportedEncodingException {
        RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
            Object data = execute(type,namespace, postUrl, xzjfMethodName,xzjfMethodId, 0, null ,sgs_apiKey);
            result.setData(data);
            return result;
        } catch (Exception e) {
            com.py.framework.core.log.ExceptionLogger.error("UploadPublicController#uploadXzjf", "行政给付信息回传异常！ERROR：" + e.getMessage(), e);
            result.setCode(RestServiceResult.CODE_UNKNOW);
            result.setMsg("行政给付回传定时任务异常！");
            return result;
        }
    }

    /**
     * 行政奖励
     * @param type 12 法人 13 自然人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadXzjl.json")
    public RestServiceResult<Object>  uploadXzjl(int type) throws UnsupportedEncodingException {
        RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
            Object data = execute(type,namespace, postUrl, xzjlMethodName,xzjlMethodId, 0, null ,sgs_apiKey);
            result.setData(data);
            return result;
        } catch (Exception e) {
            com.py.framework.core.log.ExceptionLogger.error("UploadPublicController#uploadXzjl", "行政奖励信息回传异常！ERROR：" + e.getMessage(), e);
            result.setCode(RestServiceResult.CODE_UNKNOW);
            result.setMsg("行政奖励回传定时任务异常！");
            return result;
        }
    }

    /**
     * 行政裁决
     * @param type 14 法人 15 自然人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadXzcj.json")
    public RestServiceResult<Object>  uploadXzcj(int type) throws UnsupportedEncodingException {
        RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
            Object data = execute(type,namespace, postUrl, xzcjMethodName,xzcjMethodId, 0, null ,sgs_apiKey);
            result.setData(data);
            return result;
        } catch (Exception e) {
            com.py.framework.core.log.ExceptionLogger.error("UploadPublicController#uploadXzcj", "行政裁决信息回传异常！ERROR：" + e.getMessage(), e);
            result.setCode(RestServiceResult.CODE_UNKNOW);
            result.setMsg("行政裁决回传定时任务异常！");
            return result;
        }
    }

    /**
     * 行政确认
     * @param type 16 法人 17 自然人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadXzqr.json")
    public RestServiceResult<Object>  uploadXzqr(int type) throws UnsupportedEncodingException {
        RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
            Object data = execute(type,namespace, postUrl, xzqrMethodName,xzqrMethodId, 0, null ,sgs_apiKey);
            result.setData(data);
            return result;
        } catch (Exception e) {
            com.py.framework.core.log.ExceptionLogger.error("UploadPublicController#uploadXzqr", "行政确认信息回传异常！ERROR：" + e.getMessage(), e);
            result.setCode(RestServiceResult.CODE_UNKNOW);
            result.setMsg("行政确认回传定时任务异常！");
            return result;
        }
    }

    /**
     * 其他行政管理
     * @param type 18 法人 19 自然人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadQtxzgl.json")
    public RestServiceResult<Object>  uploadQtxzgl(int type) throws UnsupportedEncodingException {
        RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
            Object data = execute(type,namespace, postUrl, qtxzglMethodName,qtxzglMethodId, 0, null ,sgs_apiKey);
            result.setData(data);
            return result;
        } catch (Exception e) {
            com.py.framework.core.log.ExceptionLogger.error("UploadPublicController#uploadQtxzgl", "其他行政管理信息回传异常！ERROR：" + e.getMessage(), e);
            result.setCode(RestServiceResult.CODE_UNKNOW);
            result.setMsg("其他行政管理回传定时任务异常！");
            return result;
        }
    }

    /**
     * 信用承诺
     * @param type 20 法人 21 自然人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadXycn.json")
    public RestServiceResult<Object>  uploadXycn(int type) throws UnsupportedEncodingException {
        RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
            Object data = execute(type,namespace, postUrl, xycnMethodName,xycnMethodId, 0, null ,sgs_apiKey);
            result.setData(data);
            return result;
        } catch (Exception e) {
            com.py.framework.core.log.ExceptionLogger.error("UploadController#uploadXycn", "上传信用承诺异常！ERROR：" + e.getMessage(), e);
            result.setCode(RestServiceResult.CODE_UNKNOW);
            result.setMsg("上传信用承诺定时任务异常！");
            return result;
        }
    }

    /**
     * 抽查任务
     * @param type 22 法人 23 自然人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadCcrw.json")
    public RestServiceResult<Object>  uploadCcrw(int type) throws UnsupportedEncodingException {
        RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
            Object data = execute(type,namespace, postUrl, ccrwMethodName,ccrwMethodId, 0, null ,sgs_apiKey);
            result.setData(data);
            return result;
        } catch (Exception e) {
            com.py.framework.core.log.ExceptionLogger.error("UploadController#uploadCcrw", "上传抽查任务异常！ERROR：" + e.getMessage(), e);
            result.setCode(RestServiceResult.CODE_UNKNOW);
            result.setMsg("上传抽查任务定时任务异常！");
            return result;
        }
    }

    /**
     * 抽查结果
     * @param type 24 法人 25 自然人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadCcjg.json")
    public RestServiceResult<Object>  uploadCcjg(int type) throws UnsupportedEncodingException {
        RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
            Object data = execute(type,namespace, postUrl, ccjgMethodName,ccjgMethodId, 0, null ,sgs_apiKey);
            result.setData(data);
            return result;
        } catch (Exception e) {
            com.py.framework.core.log.ExceptionLogger.error("UploadController#uploadCcrw", "上传抽查结果异常！ERROR：" + e.getMessage(), e);
            result.setCode(RestServiceResult.CODE_UNKNOW);
            result.setMsg("上传抽查结果定时任务异常！");
            return result;
        }
    }

    /**
     *
     * @param type 0 法人许可 1 自然人许可 2 法人处罚 3 自然人处罚  4 法人监督检查 5 自然人监督检查6 法人行政强制
     *             7 自然人行政强制8 法人行政征收 9 自然人行政征收10 法人行政给付 11 自然人行政给付12 法人行政奖励
     *             13 自然人行政奖励14 法人行政裁决 15 自然人行政裁决16 法人行政确认 17 自然人行政确认
     *             18 法人其他行政管理 19 自然人其他行政管理20 法人信用承诺 21 自然人信用承诺22 法人抽查任务
     *             23 自然人抽查任务24 法人抽查结果 25 自然人抽查结果
     * @param postUrl
     * @param method
     * @param paramsNum
     * @param params
     * @return
     * @throws UnsupportedEncodingException
     */

    public String execute(int type,String namespace, String postUrl, String method,String methodid, int paramsNum, String[] params, String apiKey) throws UnsupportedEncodingException {
        try {
            Date reqDate = new Date();
            String tableName="";
            if(type==0){//0 法人许可
                tableName="t_1000000010001_3ioj4gezqu";
                List<SubmitXzxkBean> xzxkList = upLoadService.getXzXkList();
                List<List<SubmitXzxkBean>> parList = ListUtils.partition(xzxkList, 1);

                for (int i = 0; i < parList.size(); i++) {
                    List<SubmitXzxkBean> spXkList = parList.get(i);
                    SubmitReqData req = new SubmitReqData();
                    req.setXzxk(spXkList);

                    // 上报数据转换成xml
                    String xzxkXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("上报数据转换成xml" + xzxkXmlValue);
                    log.debug("行政许可转XML内容：{}", xzxkXmlValue);
                    //tid  10
                    String respXzxkValue = doPostSoap(postUrl, xzxkXmlValue,apiKey, method,methodid,"xxid_001");
//                    String respXzxkValue = "{\"status\":\"00\",\"zongnum\":1,\"chenggongnum\":0,\"shibainum\":1,\"exlfileid\":null,\"subtext\":[{\"hangid\":1,\"zhuangtai\":\"2\",\"cuowustr\":\"\\u7701\\u63a5\\u53e3\\u53cd\\u9988\\uff1a\\u4e0a\\u62a5\\u6570\\u636e\\u4e0e\\u6570\\u636e\\u5e93\\u4e2d\\u6570\\u636e\\u91cd\\u590d;\"}]}";
                    Date resDate = new Date();
                    log.info("返回行政许可上报结果信息：{}", respXzxkValue);
                    System.out.println("返回行政许可上报结果信息：{}" + respXzxkValue);
//                    SubmitXzxkRespData xzxkResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzxkValue);
                    //保存返回数据
                    List<String> recordIds = spXkList.stream().map(SubmitXzxkBean -> SubmitXzxkBean.getId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzxkResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzxkValue,recordIds,type,reqDate,resDate);
                    //return respXzxkValue;
                }

            }else if(type==1){//1 自然人许可
                tableName="t_1000010010003_vVwjDLoDWy";
                List<SubmitXzxkBean> xzxkList = upLoadService.getZrrXzXkList();
                List<List<SubmitXzxkBean>> parList = ListUtils.partition(xzxkList, 1);

                for (int i = 0; i < parList.size(); i++) {
                    List<SubmitXzxkBean> spXkList = parList.get(i);
                    SubmitReqData req = new SubmitReqData();
                    req.setXzxk(spXkList);
                    // 上报数据转换成xml
                    String xzxkXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("上报自然人许可数据转换成xml" + xzxkXmlValue);
                    log.debug("自然人行政许可转XML内容：{}", xzxkXmlValue);
                    String respXzxkValue = doPostSoap(postUrl, xzxkXmlValue,apiKey, method,methodid,"xxid_001");
                    Date resDate = new Date();
                    log.info("返回自然人行政许可上报结果信息：{}", respXzxkValue);
                    System.out.println("返回自然人行政许可上报结果信息：{}" + respXzxkValue);
//                    SubmitXzxkRespData xzxkResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzxkValue);
                    //保存返回数据
                    List<String> recordIds = spXkList.stream().map(SubmitXzxkBean -> SubmitXzxkBean.getId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzxkResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzxkValue,recordIds,type,reqDate,resDate);
                    //return respXzxkValue;

                }

            }else if(type==2){//2 法人处罚

                tableName="t_1000000010002_xsni4zszp0";
                List<SubmitXzcfBean> xzCfList = upLoadService.getFrXzCfList();
                List<List<SubmitXzcfBean>> parList = ListUtils.partition(xzCfList, 1);

                for (int i = 0; i < parList.size(); i++) {
                    List<SubmitXzcfBean> spCfList = parList.get(i);
                    SubmitReqData req = new SubmitReqData();
                    req.setXzcf(spCfList);
                    // 上报数据转换成xml
                    String xzCfXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("上报行政处罚数据转换成xml" + xzCfXmlValue);
                    log.debug("行政处罚转XML内容：{}", xzCfXmlValue);
                    String respXzxkValue = doPostSoap(postUrl, xzCfXmlValue, apiKey, method,methodid,"xxid_001");
//                    String respXzxkValue = "{\"status\":\"00\",\"zongnum\":14,\"chenggongnum\":1,\"shibainum\":13,\"exlfileid\":\"\",\"subtext\":[{\"hangid\":1,\"zhuangtai\":\"3\",\"cuowustr\":\"\\u5e02\\u63a5\\u53e3\\u53cd\\u9988\\uff1a\\u8fdf\\u62a5\"},{\"hangid\":2,\"zhuangtai\":\"3\",\"cuowustr\":\"\\u5e02\\u63a5\\u53e3\\u53cd\\u9988\\uff1a\\u8fdf\\u62a5\"},{\"hangid\":3,\"zhuangtai\":\"3\",\"cuowustr\":\"\\u5e02\\u63a5\\u53e3\\u53cd\\u9988\\uff1a\\u8fdf\\u62a5\"},{\"hangid\":4,\"zhuangtai\":\"3\",\"cuowustr\":\"\\u5e02\\u63a5\\u53e3\\u53cd\\u9988\\uff1a\\u8fdf\\u62a5\"},{\"hangid\":5,\"zhuangtai\":\"3\",\"cuowustr\":\"\\u5e02\\u63a5\\u53e3\\u53cd\\u9988\\uff1a\\u8fdf\\u62a5\"},{\"hangid\":6,\"zhuangtai\":\"3\",\"cuowustr\":\"\\u5e02\\u63a5\\u53e3\\u53cd\\u9988\\uff1a\\u8fdf\\u62a5\"},{\"hangid\":7,\"zhuangtai\":\"3\",\"cuowustr\":\"\\u5e02\\u63a5\\u53e3\\u53cd\\u9988\\uff1a\\u8fdf\\u62a5\"},{\"hangid\":8,\"zhuangtai\":\"3\",\"cuowustr\":\"\\u5e02\\u63a5\\u53e3\\u53cd\\u9988\\uff1a\\u8fdf\\u62a5\"},{\"hangid\":9,\"zhuangtai\":\"3\",\"cuowustr\":\"\\u5e02\\u63a5\\u53e3\\u53cd\\u9988\\uff1a\\u8fdf\\u62a5\"},{\"hangid\":10,\"zhuangtai\":\"3\",\"cuowustr\":\"\\u5e02\\u63a5\\u53e3\\u53cd\\u9988\\uff1a\\u8fdf\\u62a5\"},{\"hangid\":11,\"zhuangtai\":\"3\",\"cuowustr\":\"\\u5e02\\u63a5\\u53e3\\u53cd\\u9988\\uff1a\\u8fdf\\u62a5\"},{\"hangid\":12,\"zhuangtai\":\"3\",\"cuowustr\":\"\\u5e02\\u63a5\\u53e3\\u53cd\\u9988\\uff1a\\u8fdf\\u62a5\"},{\"hangid\":13,\"zhuangtai\":\"3\",\"cuowustr\":\"\\u5e02\\u63a5\\u53e3\\u53cd\\u9988\\uff1a\\u8fdf\\u62a5\"},{\"hangid\":14,\"zhuangtai\":\"1\",\"cuowustr\":\"\"}]}";
                    Date resDate = new Date();
                    log.info("返回行政处罚上报结果信息：{}", respXzxkValue);
                    System.out.println("返回行政处罚上报结果信息：{}" + respXzxkValue);
//                    SubmitXzxkRespData xzCfResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzxkValue);
                    //保存返回数据
                    List<String> recordIds = spCfList.stream().map(SubmitXzcfBean -> SubmitXzcfBean.getId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzCfResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzxkValue,recordIds,type,reqDate,resDate);
                }

            }else if(type==3){//3 自然人处罚
                tableName="t_1000010010004_kfpulzpf7d";
                List<SubmitXzcfBean> xzCfList = upLoadService.getZrrXzCfList();
                List<List<SubmitXzcfBean>> parList = ListUtils.partition(xzCfList, 1);

                for (int i = 0; i < parList.size(); i++) {
                    List<SubmitXzcfBean> spCfList = parList.get(i);
                    SubmitReqData req = new SubmitReqData();
                    req.setXzcf(spCfList);
                    // 上报数据转换成xml
                    String xzCfXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("上报行政处罚数据转换成xml" + xzCfXmlValue);
                    log.debug("行政处罚转XML内容：{}", xzCfXmlValue);
                    String respXzxkValue = doPostSoap(postUrl, xzCfXmlValue, apiKey,method,methodid,"xxid_001");
                    Date resDate = new Date();
                    log.info("返回行政处罚上报结果信息：{}", respXzxkValue);
                    System.out.println("返回行政处罚上报结果信息：{}" + respXzxkValue);
//                    SubmitXzxkRespData xzCfResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzxkValue);
                    //保存返回数据
                    List<String> recordIds = spCfList.stream().map(SubmitXzcfBean -> SubmitXzcfBean.getId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzCfResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzxkValue,recordIds,type,reqDate,resDate);
                }
            }else if(type==4) {//4 法人监督检查
                tableName="t_1000000010252_akk9bUnaL3";
                List<SupervisoryReview> list = uploadPublicDao.getSupervisoryReviewByFr(tableName);
                List<List<SupervisoryReview>> parList = ListUtils.partition(list, 1);

                for (int i = 0; i < parList.size(); i++) {
                    List<SupervisoryReview> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzjc(spList);
                    String xzjcXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("监督检查转XML内容：{}"+xzjcXmlValue);
                    log.debug("监督检查转XML内容：{}", xzjcXmlValue);
                    String respXzxkValue = doPostSoap(postUrl, xzjcXmlValue, apiKey,method,methodid,"xxid_001");
                    log.info("返回监督检查上报结果信息：{}", respXzxkValue);
//                    SubmitXzxkRespData xzjcResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzxkValue);
                    //保存返回数据
                    Date resDate = new Date();
                    List<String> recordIds = spList.stream().map(SupervisoryReview -> SupervisoryReview.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzjcResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzxkValue,recordIds,type,reqDate,resDate);
                    //return respXzxkValue;
                }
            }else if(type==5) {//5 自然人监督检查
                tableName="t_1000010010430_E0pP6YlewE";
                List<SupervisoryReview> list = uploadPublicDao.getSupervisoryReviewByZrr(tableName);
                List<List<SupervisoryReview>> parList = ListUtils.partition(list, 1);

                for (int i = 0; i < parList.size(); i++) {
                    List<SupervisoryReview> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzjc(spList);
                    String xzjcXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("监督检查转XML内容：{}"+xzjcXmlValue);
                    log.debug("监督检查转XML内容：{}", xzjcXmlValue);
                    String respXzxkValue = doPostSoap(postUrl, xzjcXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回监督检查上报结果信息：{}", respXzxkValue);
//                    SubmitXzxkRespData xzjcResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzxkValue);
                    //保存返回数据

                    List<String> recordIds = spList.stream().map(SupervisoryReview -> SupervisoryReview.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzjcResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzxkValue,recordIds,type,reqDate ,resDate);
                    //return respXzxkValue;
                }
            }else if(type==6) {//6 法人行政强制
                tableName="t_1000000010019_bgWiiN00cb";
                List<XzqzEntity> list = uploadPublicDao.getXzqzByFr(tableName);
                List<List<XzqzEntity>> parList = ListUtils.partition(list, 1);

                for (int i = 0; i < parList.size(); i++) {
                    List<XzqzEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzqz(spList);
                    String xzqzXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政强制转XML内容：{}"+xzqzXmlValue);
                    log.debug("行政强制转XML内容：{}", xzqzXmlValue);
                    String respXzqzValue = doPostSoap(postUrl, xzqzXmlValue, apiKey,method,methodid,"xxid_001");
                    log.info("返回行政强制上报结果信息：{}", xzqzXmlValue);
//                    SubmitXzxkRespData xzqzResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzqzValue);
                    //保存返回数据
                    Date  resDate = new Date();
                    List<String> recordIds = spList.stream().map(XzqzEntity -> XzqzEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzqzResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzqzValue,recordIds,type,reqDate ,resDate);
                    //return respXzqzValue;
                }
            }else if(type==7) {//7 自然人行政强制
                tableName="t_1000010010085_nbWY1hOWBB";
                List<XzqzEntity> list = uploadPublicDao.getXzqzByZrr(tableName);
                List<List<XzqzEntity>> parList = ListUtils.partition(list, 1);

                for (int i = 0; i < parList.size(); i++) {
                    List<XzqzEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzqz(spList);
                    String xzqzXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政强制转XML内容：{}"+xzqzXmlValue);
                    log.debug("行政强制转XML内容：{}", xzqzXmlValue);
                    String respXzqzValue = doPostSoap(postUrl, xzqzXmlValue, apiKey,method,methodid,"xxid_001");
                    log.info("返回行政强制上报结果信息：{}", xzqzXmlValue);
//                    SubmitXzxkRespData xzqzResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzqzValue);
                    //保存返回数据
                    Date  resDate = new Date();
                    List<String> recordIds = spList.stream().map(XzqzEntity -> XzqzEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzqzResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzqzValue,recordIds,type,reqDate ,resDate);
                    //return respXzqzValue;
                }
            }else if(type==8) {//8 法人行政征收
                tableName="t_1000000010045_6HelrLv0OJ";
                List<XzzsEntity> list = uploadPublicDao.getXzzsFr(tableName);
                List<List<XzzsEntity>> parList = ListUtils.partition(list, 1);
                for (int i = 0; i < parList.size(); i++) {
                    List<XzzsEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzzs(spList);
                    String xzzsXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政征收转XML内容：{}"+xzzsXmlValue);
                    log.debug("行政征收转XML内容：{}", xzzsXmlValue);
                    String respXzzsValue = doPostSoap(postUrl, xzzsXmlValue, apiKey,method,methodid,"xxid_001");
                    log.info("返回行政征收上报结果信息：{}", respXzzsValue);
//                    SubmitXzxkRespData xzzsResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzzsValue);
                    //保存返回数据
                    Date  resDate = new Date();
                    List<String> recordIds = spList.stream().map(XzzsEntity -> XzzsEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzzsResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzzsValue,recordIds,type,reqDate ,resDate);
                    //return respXzzsValue;
                }
            }else if(type==9) {//9 自然人行政征收
                tableName="t_1000010010089_NKoHe65W3V";
                List<XzzsEntity> list = uploadPublicDao.getXzzsByZrr(tableName);
                List<List<XzzsEntity>> parList = ListUtils.partition(list, 1);
                for (int i = 0; i < parList.size(); i++) {
                    List<XzzsEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzzs(spList);
                    String xzzsXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政征收转XML内容：{}"+xzzsXmlValue);
                    log.debug("行政征收转XML内容：{}", xzzsXmlValue);
                    String respXzzsValue = doPostSoap(postUrl, xzzsXmlValue, apiKey,method,methodid,"xxid_001");
                    log.info("返回行政征收上报结果信息：{}", respXzzsValue);
//                    SubmitXzxkRespData xzzsResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzzsValue);
                    //保存返回数据
                    Date  resDate = new Date();
                    List<String> recordIds = spList.stream().map(XzzsEntity -> XzzsEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzzsResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzzsValue,recordIds,type,reqDate ,resDate);
                    //return respXzzsValue;

                }
            }else if(type==10) {//10 法人行政给付
                tableName="t_1000000010081_B1jxBXNyHJ";
                List<XzjfEntity> list = uploadPublicDao.getXzjfByFr(tableName);
                List<List<XzjfEntity>> parList = ListUtils.partition(list, 1);
                for (int i = 0; i < parList.size(); i++) {
                    List<XzjfEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzjf(spList);
                    String xzjfXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政给付转XML内容：{}"+xzjfXmlValue);
                    log.debug("行政给付转XML内容：{}", xzjfXmlValue);
                    String respXzjfValue = doPostSoap(postUrl, xzjfXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回给付征收上报结果信息：{}", respXzjfValue);
//                    SubmitXzxkRespData xzjfResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzjfValue);
                    //保存返回数据
                    List<String> recordIds = spList.stream().map(XzjfEntity -> XzjfEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzjfResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzjfValue,recordIds,type,reqDate ,resDate);
                    //return respXzjfValue;

                }
            }else if(type==11) {//11 自然人行政给付
                tableName="t_1000010010092_FnFxdTFOv9";
                List<XzjfEntity> list = uploadPublicDao.getXzjfByZrr(tableName);
                List<List<XzjfEntity>> parList = ListUtils.partition(list, 1);
                for (int i = 0; i < parList.size(); i++) {
                    List<XzjfEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzjf(spList);
                    String xzjfXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政给付转XML内容：{}"+xzjfXmlValue);
                    log.debug("行政给付转XML内容：{}", xzjfXmlValue);
                    String respXzjfValue = doPostSoap(postUrl, xzjfXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回给付征收上报结果信息：{}", respXzjfValue);
//                    SubmitXzxkRespData xzjfResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzjfValue);
                    //保存返回数据
                    List<String> recordIds = spList.stream().map(XzjfEntity -> XzjfEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzjfResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzjfValue,recordIds,type,reqDate ,resDate);
                    //return respXzjfValue;

                }
            }else if(type==12) {//12 法人行政奖励
                tableName="t_1000000010082_LuLlDPXj9d";
                List<XzjlEntity> list = uploadPublicDao.getXzjlByFr(tableName);
                List<List<XzjlEntity>> parList = ListUtils.partition(list, 1);
                for (int i = 0; i < parList.size(); i++) {
                    List<XzjlEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzjl(spList);
                    String xzjlXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政激励转XML内容：{}"+xzjlXmlValue);
                    log.debug("行政激励转XML内容：{}", xzjlXmlValue);
                    String respXzjlValue = doPostSoap(postUrl, xzjlXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回行政激励上报结果信息：{}", respXzjlValue);
//                    SubmitXzxkRespData xzjlResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzjlValue);
                    //保存返回数据
                    List<String> recordIds = spList.stream().map(XzjlEntity -> XzjlEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzjlResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzjlValue,recordIds,type,reqDate ,resDate);
                    //return respXzjlValue;
                }
            }else if(type==13) {//13 自然人行政奖励
                tableName="t_1000010010098_ek9kcfC7gn";
                List<XzjlEntity> list = uploadPublicDao.getXzjlByZrr(tableName);
                List<List<XzjlEntity>> parList = ListUtils.partition(list, 1);
                for (int i = 0; i < parList.size(); i++) {
                    List<XzjlEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzjl(spList);
                    String xzjlXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政激励转XML内容：{}"+xzjlXmlValue);
                    log.debug("行政激励转XML内容：{}", xzjlXmlValue);
                    String respXzjlValue = doPostSoap(postUrl, xzjlXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回行政激励上报结果信息：{}", respXzjlValue);
//                    SubmitXzxkRespData xzjlResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzjlValue);
                    //保存返回数据
                    List<String> recordIds = spList.stream().map(XzjlEntity -> XzjlEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzjlResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzjlValue,recordIds,type,reqDate ,resDate);
                    //return respXzjlValue;
                }
            }else if(type==14) {//14 法人行政裁决
                tableName="t_1000000010078_72Blr6pCCj";
                List<XzcjEntity> list = uploadPublicDao.getXzcjByFr(tableName);
                List<List<XzcjEntity>> parList = ListUtils.partition(list, 1);
                for (int i = 0; i < parList.size(); i++) {
                    List<XzcjEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzcj(spList);
                    String xzcjXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政惩戒转XML内容：{}"+xzcjXmlValue);
                    log.debug("行政惩戒转XML内容：{}", xzcjXmlValue);
                    String respXzcjValue = doPostSoap(postUrl, xzcjXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回行政惩戒上报结果信息：{}", respXzcjValue);
//                    SubmitXzxkRespData xzcjResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzcjValue);
                    //保存返回数据
                    List<String> recordIds = spList.stream().map(XzcjEntity -> XzcjEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzcjResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzcjValue,recordIds,type,reqDate ,resDate);
                    //return respXzcjValue;
                }
            }else if(type==15) {//15 自然人行政裁决
                tableName="t_1000010010088_bmuDHF0DxX";
                List<XzcjEntity> list = uploadPublicDao.getXzcjByZrr(tableName);
                List<List<XzcjEntity>> parList = ListUtils.partition(list, 1);
                for (int i = 0; i < parList.size(); i++) {
                    List<XzcjEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzcj(spList);
                    String xzcjXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政惩戒转XML内容：{}"+xzcjXmlValue);
                    log.debug("行政惩戒转XML内容：{}", xzcjXmlValue);
                    String respXzcjValue = doPostSoap(postUrl, xzcjXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回行政惩戒上报结果信息：{}", respXzcjValue);
//                    SubmitXzxkRespData xzcjResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzcjValue);
                    //保存返回数据
                    List<String> recordIds = spList.stream().map(XzcjEntity -> XzcjEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzcjResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzcjValue,recordIds,type,reqDate ,resDate);
                    //return respXzcjValue;
                }
            }else if(type==16) {//16 法人行政确认
                tableName="t_1000000010079_fel4Oc0gfQ";
                List<XzqrEntity> list = uploadPublicDao.getXzqrByFr(tableName);
                List<List<XzqrEntity>> parList = ListUtils.partition(list, 1);
                for (int i = 0; i < parList.size(); i++) {
                    List<XzqrEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzqr(spList);
                    String xzqrXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政确认转XML内容：{}"+xzqrXmlValue);
                    log.debug("行政确认转XML内容：{}", xzqrXmlValue);
                    String respXzqzValue = doPostSoap(postUrl, xzqrXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回行政确认上报结果信息：{}", respXzqzValue);
//                    SubmitXzxkRespData xzqzResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzqzValue);
                    //保存返回数据
                    List<String> recordIds = spList.stream().map(XzqrEntity -> XzqrEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzqzResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzqzValue,recordIds,type,reqDate ,resDate);
                    //return respXzqzValue;
                }
            }else if(type==17) {//17 自然人行政确认
                tableName="t_1000010010091_HoTa38mRD1";
                List<XzqrEntity> list = uploadPublicDao.getXzqrByZrr(tableName);
                List<List<XzqrEntity>> parList = ListUtils.partition(list, 1);
                for (int i = 0; i < parList.size(); i++) {
                    List<XzqrEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzqr(spList);
                    String xzqrXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政确认转XML内容：{}"+xzqrXmlValue);
                    log.debug("行政确认转XML内容：{}", xzqrXmlValue);
                    String respXzqzValue = doPostSoap(postUrl, xzqrXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回行政确认上报结果信息：{}", respXzqzValue);
//                    SubmitXzxkRespData xzqzResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzqzValue);
                    //保存返回数据
                    List<String> recordIds = spList.stream().map(XzqrEntity -> XzqrEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzqzResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzqzValue,recordIds,type,reqDate ,resDate);
                    //return respXzqzValue;
                }
            }else if(type==18) {//18 法人其他行政管理
                tableName="t_1000000010083_bisEXzGGeF";
                List<XzqtglEntity> list = uploadPublicDao.getXzqtByFr(tableName);
                List<List<XzqtglEntity>> parList = ListUtils.partition(list, 1);
                for (int i = 0; i < parList.size(); i++) {
                    List<XzqtglEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzqtgl(spList);
                    String xzqtglXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政其他转XML内容：{}"+xzqtglXmlValue);
                    log.debug("行政其他转XML内容：{}", xzqtglXmlValue);
                    String respXzjcValue = doPostSoap(postUrl, xzqtglXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回行政其他上报结果信息：{}", respXzjcValue);
//                    SubmitXzxkRespData xzxkResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzjcValue);
                    //保存返回数据
                    List<String> recordIds = spList.stream().map(XzqtglEntity -> XzqtglEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzxkResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzjcValue,recordIds,type,reqDate ,resDate);
                    //return respXzjcValue;
                }
            }else if(type==19) {//19 自然人其他行政管理
                tableName="t_1000010010100_4bjNpPRKrv";
                List<XzqtglEntity> list = uploadPublicDao.getXzqtByZrr(tableName);
                List<List<XzqtglEntity>> parList = ListUtils.partition(list, 1);
                for (int i = 0; i < parList.size(); i++) {
                    List<XzqtglEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setXzqtgl(spList);
                    String xzqtglXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政其他转XML内容：{}"+xzqtglXmlValue);
                    log.debug("行政其他转XML内容：{}", xzqtglXmlValue);
                    String respXzjcValue = doPostSoap(postUrl, xzqtglXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回行政其他上报结果信息：{}", respXzjcValue);
//                    SubmitXzxkRespData xzxkResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzjcValue);
                    //保存返回数据
                    List<String> recordIds = spList.stream().map(XzqtglEntity -> XzqtglEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzxkResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzjcValue,recordIds,type,reqDate ,resDate);
                    //return respXzjcValue;
                }
            }else if(type==20) {//20 法人信用承诺
                tableName="t_1000000010398_agbpz1ybsl";
                List<FrPromiseEntity> promiseBookList = uploadXycnDao.getFrPromiseBookLlist();

                List<List<FrPromiseEntity>> parList = ListUtils.partition(promiseBookList, 1);

                for (int i = 0; i < parList.size(); i++) {
                    List<FrPromiseEntity> spList = parList.get(i);
                    SubmitXycnReqData req = new SubmitXycnReqData();
                    req.setFrPromise(spList);
                    // 上报数据转换成xml
                    String frcnsXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("上报法人承诺书转换成xml" + frcnsXmlValue);
                    log.debug("法人承诺书XML内容：{}", frcnsXmlValue);
                    String respXzxkValue = doPostSoap(postUrl, frcnsXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回法人承诺书上报结果信息：{}", respXzxkValue);
                    System.out.println("返回法人承诺书上报结果信息：{}" + respXzxkValue);
//                    SubmitXycnRespData frResp = (SubmitXycnRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXycnRespData.class, respXzxkValue);
                    List<String> recordIds = spList.stream().map(FrPromiseEntity -> FrPromiseEntity.getUUID()).collect(Collectors.toList());

//                    保存返回数据
//                    this.saveSubmitLogs(type, frResp.getResp(),recordIds,tableName);
                    this.doUpdateLog(tableName, respXzxkValue,recordIds,type,reqDate ,resDate);
                }
            }else if(type==21) {//21 自然人信用承诺
                tableName="t_1000010010567_jvhob4c2lb";
                List<ZrrPromiseEntity> promiseBookList = uploadXycnDao.getZrrPromiseBookLlist();

                List<List<ZrrPromiseEntity>> parList = ListUtils.partition(promiseBookList, 1);

                for (int i = 0; i < parList.size(); i++) {
                    List<ZrrPromiseEntity> spList = parList.get(i);
                    SubmitXycnReqData req = new SubmitXycnReqData();
                    req.setZrrPromise(spList);
                    // 上报数据转换成xml
                    String frcnsXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("上报自然人承诺书转换成xml" + frcnsXmlValue);
                    log.debug("自然人承诺书XML内容：{}", frcnsXmlValue);
                    String respXzxkValue = doPostSoap(postUrl, frcnsXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回自然人承诺书上报结果信息：{}", respXzxkValue);
                    System.out.println("返回行自然人承诺书结果信息：{}" + respXzxkValue);
//                    SubmitXycnRespData zrrResp = (SubmitXycnRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXycnRespData.class, respXzxkValue);
                    List<String> recordIds = spList.stream().map(ZrrPromiseEntity -> ZrrPromiseEntity.getUUID()).collect(Collectors.toList());

//                    保存返回数据
//                    this.saveSubmitLogs(type, zrrResp.getResp(),recordIds,tableName);
                    this.doUpdateLog(tableName, respXzxkValue,recordIds,type,reqDate ,resDate);
                }
            }else if(type==22) {//22 法人抽查任务
                tableName="t_1000000010410_dwaw88YojG";
                List<CcrwEntity> list = uploadPublicDao.getCcrw(tableName);
                List<List<CcrwEntity>> parList = ListUtils.partition(list, 1);
                for (int i = 0; i < parList.size(); i++) {
                    List<CcrwEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setCcrw(spList);
                    String xzqrXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政确认转XML内容：{}"+xzqrXmlValue);
                    log.debug("行政确认转XML内容：{}", xzqrXmlValue);
                    String respXzqzValue = doPostSoap(postUrl, xzqrXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回行政确认上报结果信息：{}", respXzqzValue);
//                    SubmitXzxkRespData xzqzResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzqzValue);
                    //保存返回数据
                    List<String> recordIds = spList.stream().map(CcrwEntity -> CcrwEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzqzResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzqzValue,recordIds,type,reqDate ,resDate);
                    //return respXzqzValue;
                }
            }else if(type==23) {//23 自然人抽查任务

            }else if(type==24) {//24 法人抽查结果
                tableName="t_1000000010409_sUlP9D0Apy";
                List<CcjgEntity> list = uploadPublicDao.getCcjg(tableName);
                List<List<CcjgEntity>> parList = ListUtils.partition(list, 1);
                for (int i = 0; i < parList.size(); i++) {
                    List<CcjgEntity> spList = parList.get(i);
                    PublishSubmitReqData req = new PublishSubmitReqData();
                    req.setCcjg(spList);
                    String xzqrXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("行政确认转XML内容：{}"+xzqrXmlValue);
                    log.debug("行政确认转XML内容：{}", xzqrXmlValue);
                    String respXzqzValue = doPostSoap(postUrl, xzqrXmlValue, apiKey,method,methodid,"xxid_001");
                    Date  resDate = new Date();
                    log.info("返回行政确认上报结果信息：{}", respXzqzValue);
//                    SubmitXzxkRespData xzqzResp = (SubmitXzxkRespData) SubmitConvXmlUtils
//                            .convertXml2Object(SubmitXzxkRespData.class, respXzqzValue);
                    //保存返回数据
                    List<String> recordIds = spList.stream().map(CcjgEntity -> CcjgEntity.getRecordId()).collect(Collectors.toList());
//                    this.saveSubmitLogs(type, xzqzResp.getResp(), recordIds, tableName);
                    this.doUpdateLog(tableName, respXzqzValue,recordIds,type,reqDate ,resDate);
                    //return respXzqzValue;
                }
            }else if(type==25) {//25 自然人抽查结果

            }
        } catch (Exception e) {
            e.printStackTrace();
            log.info("上传数据失败:", e.getMessage());
        }
        return null;
    }
    public String doUpdateLog(String tableName, String json, List<String> tid, int type, Date reqDate, Date resDate) throws IOException {

        // 创建JSON解析器
        JSONParser parser = new JSONParser();

        // 将JSON字符串解析为JSONObject对象
        try {
            JSONObject jsonObject = (JSONObject) parser.parse(json);
            List<String> recordIds = new ArrayList<>();
//            recordIds.add(tid);
            // 从JSONObject中获取值
            String status = (String) jsonObject.get("status");//状态
            Long zongnum = (Long) jsonObject.get("zongnum");
            Long chenggongnum = (Long) jsonObject.get("chenggongnum");
            Long shibainum = (Long) jsonObject.get("shibainum");
            //插入推送日志
            DateUtil dataUtil = DateUtil.getInstance();
            String batNo = "BN" + dataUtil.getCurrDate(DateUtil.YYYYMMDDHHMMSS);
            String subDate = dataUtil.getCurrDate(DateUtil.YYYY_MM_DD);


            SubmitLogsInfo logsInfo = new SubmitLogsInfo();
            logsInfo.setReqDate(reqDate);
            logsInfo.setResDate(resDate);
            logsInfo.setBatNo(batNo);
            logsInfo.setType(type);
            logsInfo.setSubDate(subDate);
            logsInfo.setRecStatus(status);
            logsInfo.setZongNum(zongnum.toString());
            logsInfo.setSuccNum(chenggongnum.toString());
            logsInfo.setFailNum(shibainum.toString());
            logsInfo.setTabelName(tableName);
            logsInfo.setTid(String.join(",",tid));
            this.setSubmitLogsInfo(tableName, logsInfo,tid);
            String sbyy = "";
            if(jsonObject.get("subtext") != null && !"".equals(jsonObject.get("subtext"))){
                org.json.simple.JSONArray subtext11= (org.json.simple.JSONArray) jsonObject.get("subtext");
                String subtext = (String)  subtext11.get(0).toString();//返回值
//                if(subtext.indexOf("cuowustr")>0){
//                    List<Map> subtexts = JSONArray.parseArray(subtext,Map.class);
//                    for (Map sub: subtexts){
//                        if(sub.get("cuowustr") !=null && !"".equals(sub.get("cuowustr"))){
//                            String  info = Normalizer.normalize(sub.get("cuowustr").toString(), Normalizer.Form.NFKC);
//                            sub.put("cuowustr",info);
//                        }
//                    }
//                    subtext = JSONArray.toJSONString(subtexts);
//                    sbyy = subtexts.get(0).get("cuowustr").toString();
//                }
                JSONObject test = (JSONObject) parser.parse(subtext);
                sbyy = (String) test.get("cuowustr");//状态
                logsInfo.setCuowustr(subtext);
            }

            if(chenggongnum == 1){//更新数据表推送状态
                //
                uploadPublicDao.updateXzStatusByRecordIds(tableName,"Y","推送成功","",tid);//需改原数据的状态
//                logsInfo.setSuccNum("1" );
//                logsInfo.setFailNum("0");
//                logsInfo.setRecStatus("1");
            }else{
                uploadPublicDao.updateXzStatusByRecordIds(tableName,"N","推送失败",sbyy,tid);//需改原数据的状态
//                JSONObject jsonObject1 = (JSONObject) parser.parse(subtext);
//                logsInfo.setTabelName(tableName);
//                String cuowustr = jsonObject1.get("cuowustr").toString();
//                logsInfo.setSuccNum("0" );
//                logsInfo.setFailNum("1");
//                logsInfo.setRecStatus("1");
//                String  info = Normalizer.normalize(cuowustr, Normalizer.Form.NFKC);
//                logsInfo.setRemarkInfo(info);
            }
            uploadPublicDao.saveSubmitLogsInfo(logsInfo);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }

    public void setSubmitLogsInfo(String tableName,SubmitLogsInfo logsInfo,List<String> tid){
        try{
            List<Map<String,Object>> configs = uploadPublicDao.selectSubmitLogsConfigs(tableName);
            List<Map<String,Object>> dataList = uploadPublicDao.selectData(tableName,tid);
            Map<String,Object> config = new HashMap<>();
            for(Map<String,Object> c:configs){
                config.put(c.get("log_filed").toString(),c.get("col_name"));
            }
            String titleName =  dataList.stream().map(d -> getStringToObject(d.get(config.get("titleName")))).collect(Collectors.joining(","));
            String titleId = dataList.stream().map(d -> getStringToObject(d.get(config.get("titleId")))).collect(Collectors.joining(","));
            String bzxrName = dataList.stream().map(d -> getStringToObject(d.get(config.get("bzxrName")))).collect(Collectors.joining(","));
            String bzxrId = dataList.stream().map(d -> getStringToObject(d.get(config.get("bzxrId")))).collect(Collectors.joining(","));
            String zxdwbh = dataList.stream().map(d -> getStringToObject(d.get(config.get("zxdwbh")))).collect(Collectors.joining(","));
            String zxdwName = dataList.stream().map(d -> getStringToObject(d.get(config.get("zxdwName")))).collect(Collectors.joining(","));
            logsInfo.setTitleName(titleName);
            logsInfo.setTitleId(titleId);
            logsInfo.setBzxrName(bzxrName);
            logsInfo.setBzxrId(bzxrId);
            logsInfo.setZxdwbh(zxdwbh);
            logsInfo.setZxdwName(zxdwName);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
    public String getStringToObject(Object object){
        if(!org.springframework.util.StringUtils.isEmpty(object)){
            return object.toString();
        }
        return "";
    }

public String doPostSoap(String postUrl, String soapXml, String apiKey,
                         String soapAction,String tid,String xxid) throws IOException {
            String StringResult = "";
            //不需要手动关闭httpClient
    OkHttpClient client = new OkHttpClient();
    FormBody.Builder builder = new FormBody.Builder();
    builder.add("APIKEY",apiKey);//接口秘钥
    builder.add("tid",tid);//报送类别ID
    builder.add("MethodName",soapAction);//报送类别方法名称
    builder.add("exlfilelist_id","");//批量报送批次ID，单条报送时为空
    builder.add("xxid", xxid);   //单条报送信息 ID，批次报送时为空
    builder.add("UserCode", "1620"); //在市平台的用户ID
    builder.add("permissionXml", soapXml); //信息主体XML字符串
    Request request = new Request.Builder()
            .url(postUrl).post(builder.build())
            .build();
            setLog(DateUtils.getCurrentFullTime());
            setLog("请求地址:"+ postUrl);
            setLog("请求方法:"+soapAction);
            setLog("APIKEY:"+apiKey);
            setLog("tid:"+tid);
            setLog("MethodName:"+soapAction);
            setLog("exlfilelist_id:");
            setLog("xxid:"+xxid);
            setLog("UserCode:1620");
            setLog("permissionXml:"+soapXml);
            try {
                Response response = client.newCall(request).execute();
                StringResult = response.body().string();
                setLog("请求结果::"+ StringResult);
            } catch (IOException e) {
                StringResult = "errorException:" + e.getMessage();
                setLog("请求失败:"+StringResult);
                e.printStackTrace();

            }
            return StringResult;

}
    /**
     * 使用SOAP1.1发送消息
     *
     * @param postUrl
     * @param soapXml
     * @param soapAction
     * @return
     */
    public String doPostSoap1_1(String postUrl, String soapXml, String apiKey,
                                String soapAction,String tid,String xxid) throws UnsupportedEncodingException {
        HttpsURLConnection.setDefaultHostnameVerifier(

                new HostnameVerifier(){

                    public boolean verify(String hostname,

                                          SSLSession sslSession) {
                        return true;


                    }
                });

        System.clearProperty("javax.net.ssl.trustStore");

        System.clearProperty("javax.net.ssl.trustStorePassword");

        try {

            //这里需要注意的是证书路径如果有空格，上面getPath()会把空格转码为%20F，需要转一次码，其他特殊字符也需注意
            System.setProperty("javax.net.ssl.trustStore", "C:\\cacerts");
            System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
            System.setProperty("org.jboss.security.ignoreHttpsHost", "true");
        } catch (Exception e) {

            e.printStackTrace();

        }
        try {
            trustAllHttpsCertificates();
        } catch (Exception e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }
        HttpsURLConnection.setDefaultHostnameVerifier(hv);

        try {
            Properties props = System.getProperties();
            props.setProperty("org.apache.cxf.stax.allowInsecureParser", "1");
            props.setProperty("UseSunHttpHandler", "true");
            props.setProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");;
            String nameSpace = "http://dal.rjcloud.dal";
            TLSClientParameters tlsParams = new TLSClientParameters();
            tlsParams.setDisableCNCheck(true);

            JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
            Client client = clientFactory.createClient(postUrl);
            HTTPConduit httpConduit = (HTTPConduit) client.getConduit();
            httpConduit.setTlsClientParameters(tlsParams);
            System.out.println("请求地址:"+postUrl);
            System.out.println("请求方法:"+soapAction);
            setLog(DateUtils.getCurrentFullTime());
            setLog("请求地址:"+postUrl);
            setLog("请求方法:"+soapAction);
            setLog("xml:"+soapXml);
            Object[] obj = client.invoke(soapAction, new Object[]{apiKey,tid,soapAction,"",xxid,UserCode,soapXml});
            System.out.println("请求结果:");
            System.out.println(String.valueOf(obj[0]));
            setLog("请求结果:"+String.valueOf(obj[0]));
            return String.valueOf(obj[0]);
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println(e.getMessage());
        }
        return "";
    }


    public void setLog(String data){
        try{
            FileWriter write=new FileWriter("D:\\demo\\requstlog.txt",true);
            BufferedWriter bw=new BufferedWriter(write);
            bw.write(data+"\n");
            bw.close();
            write.close();
        }catch (Exception e){

        }

    }

    /**
     *
     * @param type type
     * @param respList 返回值
     * @param recordIds id集合
     * @param tableName 表名
     */
    @Transactional
    public void saveSubmitLogs(int type, List<SubmitRespBean> respList, List<String> recordIds, String tableName) {
        // 保存上报记录信息及明细信息
        DateUtil dataUtil = DateUtil.getInstance();
        String batNo = "BN" + dataUtil.getCurrDate(DateUtil.YYYYMMDDHHMMSS);
        String subDate = dataUtil.getCurrDate(DateUtil.YYYY_MM_DD);
        SubmitLogsInfo logsInfo = new SubmitLogsInfo();

        int respSize = respList.size();
        SubmitLogsDetails detail = null;
        ArrayList<SubmitLogsDetails> detList = new ArrayList<SubmitLogsDetails>();
        //原数据的recordIds 集合



        for (int i = 0; i < respSize; i++) {
            SubmitRespBean reps = respList.get(i);
            if (reps != null && reps.getLine() != null) {

                detail = new SubmitLogsDetails();
                detail.setBatNo(batNo);
                detail.setSubCode(reps.getCode());
                detail.setSubMsg(reps.getMsg());
                detail.setRelId(recordIds.get(Integer.valueOf(reps.getLine())));

                detail.setRecStatus("1");
                detList.add(detail);
            } else {
                logsInfo.setRemarkInfo(reps.getCode() + ":" + reps.getMsg());
            }
        }

        //
        ArrayList<SubmitRespBean> sucList = (ArrayList<SubmitRespBean>) respList.stream()
                .filter((SubmitRespBean resp) -> "00".equals(resp.getCode())).collect(Collectors.toList());

//        uploadPublicDao.updateXzStatusByRecordIds(tableName,recordIds);//需改原数据的状态
        int sucSize = sucList.size();// 成功条数

        logsInfo.setBatNo(batNo);
        logsInfo.setType(type);
        logsInfo.setSubDate(subDate);
        logsInfo.setSuccNum("" + sucSize);
        logsInfo.setFailNum("" + (respList.size() - sucSize));
        logsInfo.setRecStatus("1");
        uploadPublicDao.saveSubmitLogsInfo(logsInfo);
        // 保存上报数据明细
        if (null == logsInfo.getRemarkInfo() || "".equals(logsInfo.getRemarkInfo())) {
            uploadPublicDao.saveSubmitLogsDetails(detList);
        }
    }

//    /**
//     *
//     * @param type type 0 法人许可 1 自然人许可 2 法人处罚 3 自然人处罚
//     * @param respList 返回值
//     * @param xzxkList 许可集合
//     * @param xzcfList 处罚集合
//     * @param tableName 表名
//     */
//    @Transactional
//    public void saveSubmitLogs(int type, List<SubmitRespBean> respList, List<SubmitXzxkBean> xzxkList,
//                               List<SubmitXzcfBean> xzcfList, String tableName) {
//        // 保存上报记录信息及明细信息
//        DateUtil dataUtil = DateUtil.getInstance();
//        String batNo = "BN" + dataUtil.getCurrDate(DateUtil.YYYYMMDDHHMMSS);
//        String subDate = dataUtil.getCurrDate(DateUtil.YYYY_MM_DD);
//        SubmitLogsInfo logsInfo = new SubmitLogsInfo();
//
//        int respSize = respList.size();
//        SubmitLogsDetails detail = null;
//        ArrayList<SubmitLogsDetails> detList = new ArrayList<SubmitLogsDetails>();
////原数据的recordIds 集合
//        List<String> recordIds=new ArrayList<String>();
//        if (type == 0||type==1) {// 行政许可
//            recordIds = xzxkList.stream().map(SubmitXzxkBean -> SubmitXzxkBean.getId()).collect(Collectors.toList());
//            for (int i = 0; i < respSize; i++) {
//                SubmitRespBean reps = respList.get(i);
//                if (reps != null && reps.getLine() != null) {
//                    SubmitXzxkBean xk = xzxkList.get(Integer.valueOf(reps.getLine()));
//
//                    detail = new SubmitLogsDetails();
//                    detail.setBatNo(batNo);
//                    detail.setSubCode(reps.getCode());
//                    detail.setSubMsg(reps.getMsg());
//                    detail.setRelId(xk.getId());
//                    detail.setRelLb(xk.getLb());
//                    detail.setXkXdrLb(xk.getXk_xdr_lb());
//                    detail.setXkXdrMc(xk.getXk_xdr_mc());
//                    detail.setXkLydwdm(xk.getXk_lydwdm());
//                    if ("自然人".equals(xk.getXk_xdr_lb())) {
//                        detail.setXkXdrDm(xk.getXk_xdr_zjhm());
//                    } else {
//                        detail.setXkXdrDm(xk.getXk_xdr_shxym());
//                    }
//                    detail.setSgsLx("行政许可");
//                    detail.setLrrq(xk.getSjc());
//                    detail.setRecStatus("1");
//                    detList.add(detail);
//                } else {
//                    logsInfo.setRemarkInfo(reps.getCode() + ":" + reps.getMsg());
//                }
//            }
//        } else {// 行政处罚
//            recordIds = xzcfList.stream().map(SubmitXzcfBean -> SubmitXzcfBean.getId()).collect(Collectors.toList());
//            for (int i = 0; i < respSize; i++) {
//                SubmitRespBean reps = respList.get(i);
//                if (reps != null && reps.getLine() != null) {
//                    SubmitXzcfBean cf = xzcfList.get(Integer.valueOf(reps.getLine()));
//                    detail = new SubmitLogsDetails();
//                    detail.setSgsLx("行政处罚");
//                    detail.setBatNo(batNo);
//                    detail.setSubCode(reps.getCode());
//                    detail.setSubMsg(reps.getMsg());
//                    detail.setRelId(cf.getId());
//                    detail.setRelLb(cf.getLb());
//                    detail.setXkXdrLb(cf.getCf_xdr_lb());
//                    detail.setXkXdrMc(cf.getCf_xdr_mc());
//                    detail.setXkLydwdm(cf.getCf_sjlydm());
//                    if ("自然人".equals(cf.getCf_xdr_lb())) {
//                        detail.setXkXdrDm(cf.getCf_xdr_zjhm());
//                    } else {
//                        detail.setXkXdrDm(cf.getCf_xdr_shxym());
//                    }
//                    detail.setSgsLx("行政处罚");
//                    detail.setLrrq(cf.getSjc());
//                    detail.setRecStatus("1");
//                    detList.add(detail);
//                } else {
//                    logsInfo.setRemarkInfo(reps.getCode() + ":" + reps.getMsg());
//                }
//            }
//        }
//        //
//        ArrayList<SubmitRespBean> sucList = (ArrayList<SubmitRespBean>) respList.stream()
//                .filter((SubmitRespBean resp) -> "00".equals(resp.getCode())).collect(Collectors.toList());
//
//        upLoadService.updateXzStatusByRecordIds(tableName,recordIds);//需改原数据的状态
//        int sucSize = sucList.size();// 成功条数
//
//        logsInfo.setBatNo(batNo);
//        logsInfo.setType(type);
//        logsInfo.setSubDate(subDate);
//        logsInfo.setSuccNum("" + sucSize);
//        logsInfo.setFailNum("" + (respList.size() - sucSize));
//        logsInfo.setRecStatus("1");
//        upLoadService.saveSubmitLogsInfo(logsInfo);
//        // 保存上报数据明细
//        if (null == logsInfo.getRemarkInfo() || "".equals(logsInfo.getRemarkInfo())) {
//            upLoadService.saveSubmitLogsDetails(detList);
//        }
//    }

    /**
     * 承诺书保存上传日志
     * @param type
     * @param respList
     * @param frPromiseList
     * @param zrrPromiseList
     * @param tableName 原表的表名
     */
    @Transactional
    public void savePromiseSubmitLogs(int type, List<SubmitRespBean> respList, List<FrPromiseBookBean> frPromiseList,
                                      List<ZrrPromiseBookBean> zrrPromiseList, String tableName) {
        // 保存上报记录信息及明细信息
        DateUtil dataUtil = DateUtil.getInstance();
        String batNo = "BN" + dataUtil.getCurrDate(DateUtil.YYYYMMDDHHMMSS);
        String subDate = dataUtil.getCurrDate(DateUtil.YYYY_MM_DD);
        SubmitLogsInfo logsInfo = new SubmitLogsInfo();

        int respSize = respList.size();
        SubmitPromiseLogsDetails detail = null;
        ArrayList<SubmitPromiseLogsDetails> detList = new ArrayList<SubmitPromiseLogsDetails>();
//原数据的recordIds 集合
        List<String> recordIds=new ArrayList<String>();
        if (type == 4) {// 法人信用承诺
            recordIds = frPromiseList.stream().map(FrPromiseBookBean -> FrPromiseBookBean.getId()).collect(Collectors.toList());
            for (int i = 0; i < respSize; i++) {
                SubmitRespBean reps = respList.get(i);
                if (reps != null && reps.getLine() != null) {
                    FrPromiseBookBean promise= frPromiseList.get(Integer.valueOf(reps.getLine()));

                    detail = new SubmitPromiseLogsDetails();
                    detail.setBatchNo(batNo);
                    detail.setResCode(reps.getCode());
                    detail.setResMsg(reps.getMsg());
                    detail.setRemark(promise.getMemo());
                    detail.setRecId(promise.getId());
                    detail.setType(promise.getXycn_type());
                    detail.setTyshxydm(promise.getCred_code());
                    detail.setZt_name(promise.getSubject_name());
                    detail.setZt_type("法人");
                    detail.setStatus("1");

                    detList.add(detail);
                } else {
                    logsInfo.setRemarkInfo(reps.getCode() + ":" + reps.getMsg());
                }
            }
        } else {// 自然人行政许可
            recordIds = zrrPromiseList.stream().map(ZrrPromiseBookBean -> ZrrPromiseBookBean.getId()).collect(Collectors.toList());
            for (int i = 0; i < respSize; i++) {
                SubmitRespBean reps = respList.get(i);
                if (reps != null && reps.getLine() != null) {
                    ZrrPromiseBookBean promise= zrrPromiseList.get(Integer.valueOf(reps.getLine()));

                    detail = new SubmitPromiseLogsDetails();
                    detail.setBatchNo(batNo);
                    detail.setResCode(reps.getCode());
                    detail.setResMsg(reps.getMsg());
                    detail.setRemark(promise.getMemo());
                    detail.setRecId(promise.getId());
                    detail.setType(promise.getXycn_type());
                    detail.setTyshxydm(promise.getPerson_cardno());
                    detail.setZt_name(promise.getPerson_name());
                    detail.setZt_type("自然人");
                    detail.setStatus("1");

                    detList.add(detail);
                } else {
                    logsInfo.setRemarkInfo(reps.getCode() + ":" + reps.getMsg());
                }
            }
        }
        //
        ArrayList<SubmitRespBean> sucList = (ArrayList<SubmitRespBean>) respList.stream()
                .filter((SubmitRespBean resp) -> "00".equals(resp.getCode())).collect(Collectors.toList());
        upLoadService.updateXzStatusByRecordIds(tableName,recordIds);//需改原数据的状态

        int sucSize = sucList.size();// 成功条数

        logsInfo.setBatNo(batNo);
        logsInfo.setSubDate(subDate);
        logsInfo.setSuccNum("" + sucSize);
        logsInfo.setFailNum("" + (respList.size() - sucSize));
        logsInfo.setRecStatus("1");
        upLoadService.savePromiseSubmitLogsInfo(logsInfo);
        // 保存上报数据明细
        if (null == logsInfo.getRemarkInfo() || "".equals(logsInfo.getRemarkInfo())) {
            upLoadService.saveSubmitPromiseLogsDetails(detList);
        }
    }


    @Transactional
    public void saveLyjnSubmitLogs(int type, List<SubmitRespBean> respList, List<LYJNBean> List,
                                   String tableName) {
        // 保存上报记录信息及明细信息
        DateUtil dataUtil = DateUtil.getInstance();
        String batNo = "BN" + dataUtil.getCurrDate(DateUtil.YYYYMMDDHHMMSS);
        String subDate = dataUtil.getCurrDate(DateUtil.YYYY_MM_DD);
        SubmitLogsInfo logsInfo = new SubmitLogsInfo();

        int respSize = respList.size();
        SubmitPromiseLogsDetails detail = null;
        ArrayList<SubmitPromiseLogsDetails> detList = new ArrayList<SubmitPromiseLogsDetails>();
//原数据的recordIds 集合
        List<String> recordIds=new ArrayList<String>();

        recordIds = List.stream().map(FrPromiseBookBean -> FrPromiseBookBean.getId()).collect(Collectors.toList());
        for (int i = 0; i < respSize; i++) {
            SubmitRespBean reps = respList.get(i);
            if (reps != null && reps.getLine() != null) {
                LYJNBean promise= List.get(Integer.valueOf(reps.getLine()));

                detail = new SubmitPromiseLogsDetails();
                detail.setBatchNo(batNo);
                detail.setResCode(reps.getCode());
                detail.setResMsg(reps.getMsg());
                detail.setRemark(promise.getBZ());
                detail.setRecId(promise.getId());
                detail.setType(promise.getWNRLB());
                detail.setTyshxydm(promise.getWNRDM());
                detail.setZt_name(promise.getWNRMC());

                detail.setStatus("1");

                detList.add(detail);
            } else {
                logsInfo.setRemarkInfo(reps.getCode() + ":" + reps.getMsg());
            }
        }

        //
        ArrayList<SubmitRespBean> sucList = (ArrayList<SubmitRespBean>) respList.stream()
                .filter((SubmitRespBean resp) -> "00".equals(resp.getCode())).collect(Collectors.toList());
        upLoadService.updateXzStatusByRecordIds(tableName,recordIds);//需改原数据的状态

        int sucSize = sucList.size();// 成功条数

        logsInfo.setBatNo(batNo);
        logsInfo.setSubDate(subDate);
        logsInfo.setSuccNum("" + sucSize);
        logsInfo.setFailNum("" + (respList.size() - sucSize));
        logsInfo.setRecStatus("1");
        upLoadService.savePromiseSubmitLogsInfo(logsInfo);
        // 保存上报数据明细
        if (null == logsInfo.getRemarkInfo() || "".equals(logsInfo.getRemarkInfo())) {
            upLoadService.saveSubmitPromiseLogsDetails(detList);
        }
    }
    public  String getImgStrBase64(String imagePath) {
        // 将图片文件转化为字节数组字符串，并对其进行Base64编码处理
        if(StringUtils.isNotBlank(imagePath)){
            InputStream in = null;
            byte[] data = null;
            // 读取图片字节数组
            try {
                in = new FileInputStream(imagePath);
                data = new byte[in.available()];
                in.read(data);
                in.close();
            } catch ( Exception e) {
                e.printStackTrace();
            }
            return Base64.encodeBase64String(data);
        }
        return "";

    }

    /**
     *
     * @param promiseList
     * @return
     */
    public List<FrPromiseBookBean> convert264(  List<FrPromiseBookBean> promiseList){
        for (FrPromiseBookBean promise:promiseList){
            promise.setPath_byte64(getImgStrBase64(promise.getPath_byte64()));
        }
        return promiseList;
    }
    /**
     *
     * @param promiseList
     * @return
     */
    public List<ZrrPromiseBookBean> convertZRR264(  List<ZrrPromiseBookBean> promiseList){
        for (ZrrPromiseBookBean promise:promiseList){
            promise.setPath_byte64(getImgStrBase64(promise.getPath_byte64()));
        }
        return promiseList;
    }

    public static void main(String[] args) throws Exception {
        Properties props = System.getProperties();
        props.setProperty("org.apache.cxf.stax.allowInsecureParser", "1");
        props.setProperty("UseSunHttpHandler", "true");
        props.setProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");;
        String nameSpace = "http://dal.rjcloud.dal";
        JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
        Client client = clientFactory.createClient("http://222.143.254.175:8080/xyd/ws/XyrDataInterfaceService?wsdl");
        String soapXml="<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
                "<ROWDATA>\n" +
                "    <ROW>\n" +
                "        <SUBJECT_NAME>登封市光大物业服务有限公司</SUBJECT_NAME>\n" +
                "        <CRED_CODE>91410185MA40LX7E83</CRED_CODE>\n" +
                "        <REG_CODE> </REG_CODE>\n" +
                "        <ORG_CODE> </ORG_CODE>\n" +
                "        <TAX_CODE> </TAX_CODE>\n" +
                "        <SYDW_CODE> </SYDW_CODE>\n" +
                "        <SHZZ_CODE> </SHZZ_CODE>\n" +
                "        <FR_NAME> </FR_NAME>\n" +
                "        <FR_CARDNO> </FR_CARDNO>\n" +
                "        <SOURCE_UNIT>郑州市信息中心</SOURCE_UNIT>\n" +
                "        <SOURCE_UNIT_CREDCODE>124101004160455794</SOURCE_UNIT_CREDCODE>\n" +
                "        <XYCN_CONTENT></XYCN_CONTENT>\n" +
                "        <XYCN_TYPE>主动公示型</XYCN_TYPE>\n" +
                "        <XYCN_DATE>2019-12-28</XYCN_DATE>\n" +
                "        <MEMO></MEMO>\n" +
                "        <FILE_NAME>登封市光大物业服务有限公司</FILE_NAME>\n" +
                "        <PATH_BYTE64>iVBORw0KGgoAAAANSUhEUgAAAkkAAAIACAYAAACW1/iQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAEXHSURBVHhe7d1NsyRXfedxvQuJB1tgE1hYBiPRksMGRUuWRAsa8yDJjJBpoRjTaMDhgblqhEF4LDDNgwETsLDnrr1wjO29t14QE/YLYDmzcrBg4YU3XniRUyezsioz62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LQvBjCAAQxgIB8DkiTVg+oBAxjAAAYwgAFJUj67ZOquJQYwgAEMYGDeDEiSVA+qBwxgAAMYwAAGJEnzNl4VjfbFAAYwgAEM5GNAkqR6UD1gAAMYwAAGMCBJymeXTN21xAAGMIABDMybAUmS6kH1gAEMYAADGMCAJGnexqui0b4YwAAGMICBfAxIklQPqgcMYAADGMAABiRJ+eySqbuWGMAABjCAgXkzIElSPageMIABDGAAAxiQJM3beFU02hcDGMAABjCQjwFJkupB9YABDGAAAxjAgCQpn10yddcSAxjAAAYwMG8GJEmqB9UDBjCAAQxgAAOSpHkbr4pG+2IAAxjAAAbyMSBJUj2oHjCAAQxgAAMYkCTls0um7lpiAAMYwAAG5s2AJEn1oHrAAAYwgAEMYECSNG/jVdFoXwxgAAMYwEA+BiRJqgfVAwYwgAEMYAADkqR8dsnUXUsMYAADGMDAvBmQJKkeVA8YwAAGMIABDEiS5m28KhrtiwEMYAADGMjHgCRJ9aB6wAAGMIABDGBAkpTPLpm6a4kBDGAAAxiYNwNHS5J+5R2/wVJVKhjAAAYwgAEMnA0DwV3uve/+0Z97UjYa2uZNb3578cC7Hj6bC6M6mHd1oH21LwYwgAEMDDEQnCW4S4r/7C1J4U3CmwUrC/GVH9cghQGdmE4MAxjIyUBKv2Mb41NwlVRBCn6TRZJSbMw247Gea+QaYQADGMAABqbDAElKmJME7HSA1RbaAgMYwAAGjsUASSJJSfOyxwLS++j8MIABDGBgKgyQJJJEkjCAAQxgAAMYiDBAknwwfDAwgAEMYAADGCBJIsypRJiOA4sYwAAGMDB1BiRJqgfVAwYwgAEMYAADEQb+PwGDeAgtbljvAAAAAElFTkSuQmCC</PATH_BYTE64>\n" +
                "        <ACCEPT_UNIT>郑州市信息中心</ACCEPT_UNIT>\n" +
                "        <ACCEPT_UNIT_CREDCODE>124101004160455794</ACCEPT_UNIT_CREDCODE>\n" +
                "        <IS_OPEN>1</IS_OPEN>\n" +
                "    </ROW>\n" +
                "</ROWDATA>";
        try {
            Object[] obj = client.invoke("setEnterprises", new Object[]{"7CF1549785FE3815B137E7F3DA9AB286",soapXml});
            System.out.println("请求结果:");
            System.out.println(String.valueOf(obj[0]));
        } catch (Exception e) {
            e.printStackTrace();
        }
//        Properties props = System.getProperties();
//        props.setProperty("org.apache.cxf.stax.allowInsecureParser", "1");
//        props.setProperty("UseSunHttpHandler", "true");
//        String nameSpace = "http://dal.rjcloud.dal";
//        JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
//        Client client = dcf.createClient("https://www.xyhn.gov.cn/creditdatas/ws/xzxkNewService?wsdl");
//        String respData = null;
//        QName name = new QName(nameSpace, "importPermissionXml");
//        String  soapXml="<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" +
//        "<ROWDATA>\n" +
//        "    <ROW>\n" +
//        "        <XK_WSH>\n" +
//        "            京工商海处字〔2015〕第1149号\n" +
//        "        </XK_WSH>\n" +
//        "        <XK_XKWS>\n" +
//        "            颁发领队证\n" +
//        "        </XK_XKWS>\n" +
//        "        <XK_XKLB>\n" +
//        "            认可\n" +
//        "        </XK_XKLB>\n" +
//        "        <XK_NR>\n" +
//        "            领队证\n" +
//        "        </XK_NR>\n" +
//        "        <XK_XDR_MC>\n" +
//        "            王正\n" +
//        "        </XK_XDR_MC>\n" +
//        "<XK_XDR_LB>\n" +
//        "            自然人\n" +
//        "        </XK_XDR_LB>\n" +
//        "        <XK_XDR_SHXYM>\n" +
//        "        </XK_XDR_SHXYM>\n" +
//        "        <XK_XDR_ZZJG>\n" +
//        "        </XK_XDR_ZZJG>\n" +
//        "        <XK_XDR_GSZC>\n" +
//        "        </XK_XDR_GSZC>\n" +
//        "        <XK_XDR_SWDJ>\n" +
//        "        </XK_XDR_SWDJ>\n" +
//        "        <XK_XDR_SYDW>\n" +
//        "        </XK_XDR_SYDW>\n" +
//        "        <XK_XDR_SHZZ>\n" +
//        "        </XK_XDR_SHZZ>\n" +
//        "        <XK_FRDB>\n" +
//        "        </XK_FRDB>\n" +
//        "       <XK_FR_ZJLX>       \n" +
//        "      </XK_FR_ZJLX>\n" +
//        "        <XK_FR_ZJHM>\n" +
//        "        </XK_FR_ZJHM>\n" +
//        "        <XK_XDR_ZJLX>\n" +
//        "            身份证\n" +
//        "        </XK_XDR_ZJLX>\n" +
//        "        <XK_XDR_ZJHM>\n" +
//        "            451425198201123075\n" +
//        "        </XK_XDR_ZJHM>\n" +
//        "        <XK_XKZS>\n" +
//        "            煤矿生产许可证\n" +
//        "        </XK_XKZS>\n" +
//        "        <XK_XKBH>\n" +
//        "            食品经营许可证编号\n" +
//        "        </XK_XKBH>\n" +
//        "        <XK_JDRQ>\n" +
//        "            2015/07/01\n" +
//        "        </XK_JDRQ>\n" +
//        "        <XK_YXQZ>\n" +
//        "            2015/07/01\n" +
//        "        </XK_YXQZ>\n" +
//        "        <XK_YXQZI>\n" +
//        "            2016/07/01\n" +
//        "        </XK_YXQZI>\n" +
//        "        <XK_XKJG>\n" +
//        "            市旅游委\n" +
//        "        </XK_XKJG>\n" +
//        "        <XK_XKJGDM>\n" +
//        "            91410000586038718K\n" +
//        "        </XK_XKJGDM>\n" +
//        "        <XK_ZT>\n" +
//        "            1\n" +
//        "        </XK_ZT>\n" +
//        "        <XK_LYDW>\n" +
//        "            XX省XX市发展改革委\n" +
//        "        </XK_LYDW>\n" +
//        "        <XK_LYDWDM>\n" +
//        "            91410000586038718K\n" +
//        "        </XK_LYDWDM>\n" +
//        "\n" +
//        "        <SJC>\n" +
//        "            2015/07/28\n" +
//        "        </SJC>\n" +
//        "        <BZ>\n" +
//        "            无\n" +
//        "        </BZ>\n" +
//        "        <GKFW>\n" +
//        "            1\n" +
//        "        </GKFW>\n" +
//        "        </ROW>\n" +
//        "</ROWDATA>\n";
//        Object[] objects=client.invoke("importPenalyXml", new Object[]{"7CF1549785FE3815B137E7F3DA9AB286",soapXml});
//        if (objects!=null) {
//            respData= objects[0].toString();
//        }

    }
    HostnameVerifier hv = new HostnameVerifier() {
        public boolean verify(String urlHostName, SSLSession session) {
            System.out.println("Warning: URL Host: " + urlHostName + " vs. "
                    + session.getPeerHost());
            return true;
        }
    };

    private static void trustAllHttpsCertificates() throws Exception {
        TrustManager[] trustAllCerts = new TrustManager[1];
        TrustManager tm = new miTM();
        trustAllCerts[0] = tm;
        SSLContext sc = SSLContext
                .getInstance("SSL");
        sc.init(null, trustAllCerts, null);
        HttpsURLConnection.setDefaultSSLSocketFactory(sc
                .getSocketFactory());
    }

    static class miTM implements TrustManager,
            X509TrustManager {
        public java.security.cert.X509Certificate[] getAcceptedIssuers() {
            return null;
        }

        public boolean isServerTrusted(
                java.security.cert.X509Certificate[] certs) {
            return true;
        }

        public boolean isClientTrusted(
                java.security.cert.X509Certificate[] certs) {
            return true;
        }

        public void checkServerTrusted(
                java.security.cert.X509Certificate[] certs, String authType)
                throws CertificateException {
            return;
        }

        public void checkClientTrusted(
                java.security.cert.X509Certificate[] certs, String authType)
                throws CertificateException {
            return;
        }
    }
}
